package xin.lhuo.we.server.enums;

import lombok.Getter;

/**
 * @author Lhuo
 * @date 2019/5/5 10:41
 */
@Getter
public enum ResultEnum {

    SUCCESS(0, "成功"),
    PARAM_ERROR(50001, "参数不正确"),
    TOKEN_IS_NULL(50002, "TOKEN为空"),
    TOKEN_ERROR(50003, "TOKEN值无效"),
    NOT_LOGIN(50004, "未登录"),
    UPYUN_TOKEN_FAIL(50005, "又拍云token获取失败"),
    QINIU_TOKEN_FAIL(50006, "七牛token获取失败"),
    WEATHER_FAIL(50007, "天气信息获取失败"),
    DB_UPDATE_ERROR(60001, "数据库插入失败"),
    DB_SELECT_ERROR(60002, "数据查询错误"),
    DB_DELETE_ERROR(60003, "数据删除数据失败"),
    QI_NIU_DELETE_ERROR(70001,"删除文件失败"),
    UNKNOWN_ERROR(99999, "未知错误");

    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
